package P1线性结构;

public interface Deque<E> {
    //双端队列
    public void addFirst(E element);
    public void addLast(E element);
    public E removeFirst();
    public E removeLast();
    public E getFirst();
    public E getLast();
    public int size();
    public boolean isEmpty();
    public void clear();
    //栈 Stack
    public void push(E element);    //进栈
    public E pop();                 //出栈
    public E peek();                //查看栈顶元素
    //队列 Queue
    public void offer(E element);   //入队
    public E poll();                //出队
    public E element();             //查看队首元素
}
